<?php
$this->pageTitle = 'Detail ponuky/dopytu';
?>
<div class="viewForm">
	<h3>Detail ponuky/dopytu
	<?php if (isset($userPermissions['market']['edit'])) {
		echo $this->Html->link(__('Uprav', true), array('controller' => 'market', 'action' => 'edit', $market['Market']['id']), array('class' => 'edit'));
	}?>
	</h3>
	<dl>
		<dt>Popis:</dt>
		<dd><?php echo $market['Market']['html_description']; ?></dd>

		<dt>Typ:</dt>
		<dd>
			<?php echo ($market['Market']['type'] == 1 ? 'dopyt' : 'ponuka'); ?>
		</dd>

		<?php if ($showPersonColumns !== FALSE): ?>
		<?php if ($market['Market']['fk_client_id']): ?>
		<dt>Klient:</dt>
		<dd>
			<?php echo $this->Html->link(htmlspecialchars($market['Client']['full_name']), array('controller' => 'person', 'action' => 'view', $market['Client']['id'])); ?>
		</dd>
		<?php endif; ?>
		<?php endif; ?>

		<?php if ($showPersonColumns === TRUE): ?>
		<?php if ($market['Market']['fk_tipster_id']): ?>
		<dt>Tiper:</dt>
		<dd>
			<?php echo $this->Html->link(htmlspecialchars($market['Tipster']['full_name']), array('controller' => 'person', 'action' => 'view', $market['Tipster']['id'])); ?>
		</dd>
		<?php endif; ?>

		<?php if ($market['Market']['fk_broker_id']): ?>
		<dt>Maklér:</dt>
		<dd>
			<?php echo $this->Html->link(htmlspecialchars($market['Broker']['full_name']), array('controller' => 'person', 'action' => 'view', $market['Broker']['id'])); ?>
		</dd>
		<?php endif; ?>
		<?php endif; ?>

		<?php if ($market['Market']['commission'] > 0): ?>
		<dt>Provízia:</dt>
		<dd>
			<?php echo $market['Market']['commission']; ?>
		</dd>
		<?php endif; ?>
	</dl>
	<div class="clear"></div>
</div>